package info.pixstone.foodhunter.apps.service;

import android.location.Location;
import android.location.LocationManager;
import android.util.Log;

public final class LocationRunnable implements Runnable {

	private static  LocationManager lmgr;
	private static  String Provider;
	private static final String TAG="LocationRunnable";
	public LocationRunnable( LocationManager mLocationManager,String mProvider)
	{
		lmgr=mLocationManager;
		Provider=mProvider;
	}
	public void run() {
		// TODO Auto-generated method stub
		Location currentLocation= lmgr.getLastKnownLocation(Provider);
		while (currentLocation == null) {
			currentLocation = lmgr.getLastKnownLocation(Provider);
			try {
				this.wait(300);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			Log.d(TAG, "XXX");
		}
	}

}
